.class final Lcom/ninesky/browser/ao;
.super Landroid/webkit/WebViewClient;


# instance fields
.field final synthetic a:Lcom/ninesky/browser/n;

.field private b:Landroid/os/Message;

.field private c:Landroid/os/Message;

.field private d:Landroid/content/DialogInterface$OnDismissListener;

.field private e:Ljava/util/LinkedList;


# direct methods
.method constructor <init>(Lcom/ninesky/browser/n;)V
    .locals 1

    iput-object p1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-direct {p0}, Landroid/webkit/WebViewClient;-><init>()V

    new-instance v0, Lcom/ninesky/browser/ba;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/ba;-><init>(Lcom/ninesky/browser/ao;)V

    iput-object v0, p0, Lcom/ninesky/browser/ao;->d:Landroid/content/DialogInterface$OnDismissListener;

    return-void
.end method

.method private a(Lcom/ninesky/browser/a;)V
    .locals 3

    new-instance v0, Landroid/app/AlertDialog$Builder;

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    iget v1, p1, Lcom/ninesky/browser/a;->a:I

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    iget-object v1, p1, Lcom/ninesky/browser/a;->b:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070005

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/ao;->d:Landroid/content/DialogInterface$OnDismissListener;

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/ao;)V
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->removeFirst()Ljava/lang/Object;

    iget-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->size()I

    move-result v0

    if-nez v0, :cond_1

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->getFirst()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/ninesky/browser/a;

    invoke-direct {p0, v0}, Lcom/ninesky/browser/ao;->a(Lcom/ninesky/browser/a;)V

    goto :goto_0
.end method

.method static synthetic b(Lcom/ninesky/browser/ao;)Landroid/os/Message;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/ao;->c:Landroid/os/Message;

    return-object v0
.end method

.method static synthetic c(Lcom/ninesky/browser/ao;)V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/ninesky/browser/ao;->c:Landroid/os/Message;

    return-void
.end method

.method static synthetic d(Lcom/ninesky/browser/ao;)V
    .locals 1

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/ninesky/browser/ao;->b:Landroid/os/Message;

    return-void
.end method

.method static synthetic e(Lcom/ninesky/browser/ao;)Landroid/os/Message;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/ao;->b:Landroid/os/Message;

    return-object v0
.end method


# virtual methods
.method public final doUpdateVisitedHistory(Landroid/webkit/WebView;Ljava/lang/String;Z)V
    .locals 6

    const/4 v2, 0x0

    invoke-static {}, Lcom/ninesky/browser/setting/a;->q()Lcom/ninesky/browser/setting/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/setting/a;->e()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    iget-object v0, v0, Lcom/ninesky/browser/n;->a:Ljava/lang/String;

    :goto_0
    if-eqz v0, :cond_0

    const/4 v1, 0x1

    const-string v3, "about:"

    const/4 v5, 0x6

    move v4, v2

    invoke-virtual/range {v0 .. v5}, Ljava/lang/String;->regionMatches(ZILjava/lang/String;II)Z

    move-result v1

    if-eqz v1, :cond_2

    :cond_0
    :goto_1
    return-void

    :cond_1
    move-object v0, p2

    goto :goto_0

    :cond_2
    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v1

    invoke-virtual {v1}, Lcom/ninesky/browser/BrowserActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    new-instance v3, Lcom/ninesky/browser/cj;

    invoke-direct {v3, p0, v1, v0}, Lcom/ninesky/browser/cj;-><init>(Lcom/ninesky/browser/ao;Landroid/content/ContentResolver;Ljava/lang/String;)V

    new-array v1, v2, [Ljava/lang/Void;

    invoke-virtual {v3, v1}, Lcom/ninesky/browser/cj;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    invoke-static {}, Landroid/webkit/WebIconDatabase;->getInstance()Landroid/webkit/WebIconDatabase;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/webkit/WebIconDatabase;->retainIconForPageUrl(Ljava/lang/String;)V

    goto :goto_1
.end method

.method public final onFormResubmission(Landroid/webkit/WebView;Landroid/os/Message;Landroid/os/Message;)V
    .locals 3

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-virtual {p2}, Landroid/os/Message;->sendToTarget()V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/ao;->b:Landroid/os/Message;

    if-eqz v0, :cond_1

    const-string v0, "NSBrowser.Tab"

    const-string v1, "onFormResubmission should not be called again while dialog is still up"

    invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {p2}, Landroid/os/Message;->sendToTarget()V

    goto :goto_0

    :cond_1
    iput-object p2, p0, Lcom/ninesky/browser/ao;->b:Landroid/os/Message;

    iput-object p3, p0, Lcom/ninesky/browser/ao;->c:Landroid/os/Message;

    new-instance v0, Landroid/app/AlertDialog$Builder;

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f070133

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070134

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070005

    new-instance v2, Lcom/ninesky/browser/bc;

    invoke-direct {v2, p0}, Lcom/ninesky/browser/bc;-><init>(Lcom/ninesky/browser/ao;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070006

    new-instance v2, Lcom/ninesky/browser/bd;

    invoke-direct {v2, p0}, Lcom/ninesky/browser/bd;-><init>(Lcom/ninesky/browser/ao;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    new-instance v1, Lcom/ninesky/browser/be;

    invoke-direct {v1, p0}, Lcom/ninesky/browser/be;-><init>(Lcom/ninesky/browser/ao;)V

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    goto :goto_0
.end method

.method public final onLoadResource(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 2

    if-eqz p2, :cond_0

    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v0

    if-lez v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->b(Lcom/ninesky/browser/n;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "https_secure"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-static {p2}, Landroid/webkit/URLUtil;->isHttpsUrl(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {p2}, Landroid/webkit/URLUtil;->isDataUrl(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-static {p2}, Landroid/webkit/URLUtil;->isAboutUrl(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    const-string v1, "https_patial_secure"

    invoke-static {v0, v1}, Lcom/ninesky/browser/n;->d(Lcom/ninesky/browser/n;Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method public final onPageFinished(Landroid/webkit/WebView;Ljava/lang/String;)V
    .locals 5

    const/4 v4, 0x0

    invoke-static {}, Lcom/ninesky/browser/setting/a;->q()Lcom/ninesky/browser/setting/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/setting/a;->e()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    iget-object v0, v0, Lcom/ninesky/browser/n;->a:Ljava/lang/String;

    :goto_0
    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1, v4}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;Z)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v1

    iget-object v2, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v3

    invoke-virtual {v3, v2}, Lcom/ninesky/browser/TabControl;->a(Lcom/ninesky/browser/n;)I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/ninesky/browser/BrowserActivity;->c(I)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    const/4 v2, 0x2

    invoke-static {v1, v2}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;I)V

    invoke-static {}, Lcom/ninesky/browser/view/br;->b()Lcom/ninesky/browser/view/br;

    move-result-object v1

    iget-object v2, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v3

    invoke-virtual {v3, v2}, Lcom/ninesky/browser/TabControl;->a(Lcom/ninesky/browser/n;)I

    move-result v2

    iget-object v3, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v3}, Lcom/ninesky/browser/n;->b(Lcom/ninesky/browser/n;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lcom/ninesky/browser/view/br;->b(ILjava/lang/String;)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-virtual {v1}, Lcom/ninesky/browser/n;->u()V

    new-instance v1, Lcom/ninesky/browser/bb;

    invoke-direct {v1, p0, v0}, Lcom/ninesky/browser/bb;-><init>(Lcom/ninesky/browser/ao;Ljava/lang/String;)V

    new-array v0, v4, [Ljava/lang/Void;

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/bb;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    return-void

    :cond_0
    move-object v0, p2

    goto :goto_0
.end method

.method public final onPageStarted(Landroid/webkit/WebView;Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .locals 5

    const/16 v4, 0x30

    const/4 v3, 0x0

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-virtual {v0}, Lcom/ninesky/browser/n;->u()V

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0, p2}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;Ljava/lang/String;)V

    invoke-static {}, Lcom/ninesky/browser/setting/a;->q()Lcom/ninesky/browser/setting/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/ninesky/browser/setting/a;->e()Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    iget-object v0, v0, Lcom/ninesky/browser/n;->a:Ljava/lang/String;

    :goto_0
    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1, v0}, Lcom/ninesky/browser/n;->b(Lcom/ninesky/browser/n;Ljava/lang/String;)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    const/4 v2, 0x1

    invoke-static {v1, v2}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;Z)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    iget-object v1, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    iget-object v1, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    iput-object v3, v1, Lcom/ninesky/browser/ck;->a:Lcom/ninesky/browser/n;

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    iput-object v3, v1, Lcom/ninesky/browser/n;->b:Lcom/ninesky/browser/ck;

    :cond_0
    if-eqz p3, :cond_1

    invoke-virtual {p3}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    if-lez v1, :cond_1

    invoke-virtual {p3}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    if-lez v1, :cond_1

    const/4 v1, 0x0

    invoke-static {p3, v4, v4, v1}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v1

    iget-object v2, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v2}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v2

    invoke-virtual {v2}, Lcom/ninesky/browser/BrowserActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    invoke-static {v2, v3, v0, v1}, Lcom/ninesky/browser/du;->a(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;)V

    :cond_1
    invoke-static {}, Landroid/webkit/CookieSyncManager;->getInstance()Landroid/webkit/CookieSyncManager;

    move-result-object v1

    invoke-virtual {v1}, Landroid/webkit/CookieSyncManager;->resetSync()V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    const/4 v2, 0x4

    invoke-virtual {v1, v2, v0}, Lcom/ninesky/browser/n;->a(ILjava/lang/String;)V

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/ninesky/browser/TabControl;->a(Lcom/ninesky/browser/n;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/BrowserActivity;->b(I)V

    return-void

    :cond_2
    move-object v0, p2

    goto :goto_0
.end method

.method public final onReceivedError(Landroid/webkit/WebView;ILjava/lang/String;Ljava/lang/String;)V
    .locals 3

    const/4 v0, -0x2

    if-eq p2, v0, :cond_1

    const/4 v0, -0x6

    if-eq p2, v0, :cond_1

    const/16 v0, -0xc

    if-eq p2, v0, :cond_1

    const/16 v0, -0xa

    if-eq p2, v0, :cond_1

    const/16 v0, -0xd

    if-eq p2, v0, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    if-nez v0, :cond_0

    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    invoke-virtual {v0}, Ljava/util/LinkedList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_2

    new-instance v0, Lcom/ninesky/browser/a;

    const/16 v1, -0xe

    if-ne p2, v1, :cond_3

    const v1, 0x7f070132

    :goto_1
    invoke-direct {v0, p0, v1, p3, p2}, Lcom/ninesky/browser/a;-><init>(Lcom/ninesky/browser/ao;ILjava/lang/String;I)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    invoke-virtual {v1, v0}, Ljava/util/LinkedList;->addLast(Ljava/lang/Object;)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->e:Ljava/util/LinkedList;

    invoke-virtual {v1}, Ljava/util/LinkedList;->size()I

    move-result v1

    const/4 v2, 0x1

    if-ne v1, v2, :cond_1

    invoke-direct {p0, v0}, Lcom/ninesky/browser/ao;->a(Lcom/ninesky/browser/a;)V

    :cond_1
    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/ninesky/browser/TabControl;->a(Lcom/ninesky/browser/n;)I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/BrowserActivity;->c(I)V

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    const/16 v1, 0x40

    invoke-static {v0, v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;I)V

    return-void

    :cond_2
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/ninesky/browser/a;

    iget v0, v0, Lcom/ninesky/browser/a;->c:I

    if-eq v0, p2, :cond_1

    goto :goto_0

    :cond_3
    const v1, 0x7f070131

    goto :goto_1
.end method

.method public final onReceivedHttpAuthRequest(Landroid/webkit/WebView;Landroid/webkit/HttpAuthHandler;Ljava/lang/String;Ljava/lang/String;)V
    .locals 8

    const/4 v7, 0x0

    const/4 v4, 0x0

    invoke-virtual {p2}, Landroid/webkit/HttpAuthHandler;->useHttpAuthUsernamePassword()Z

    move-result v0

    if-eqz v0, :cond_2

    if-eqz p1, :cond_2

    invoke-virtual {p1, p3, p4}, Landroid/webkit/WebView;->getHttpAuthUsernamePassword(Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_2

    array-length v1, v0

    const/4 v2, 0x2

    if-ne v1, v2, :cond_2

    aget-object v1, v0, v7

    const/4 v2, 0x1

    aget-object v0, v0, v2

    :goto_0
    if-eqz v1, :cond_0

    if-eqz v0, :cond_0

    invoke-virtual {p2, v1, v0}, Landroid/webkit/HttpAuthHandler;->proceed(Ljava/lang/String;Ljava/lang/String;)V

    :goto_1
    return-void

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    move-object v1, p2

    move-object v2, p3

    move-object v3, p4

    move-object v5, v4

    move-object v6, v4

    invoke-virtual/range {v0 .. v7}, Lcom/ninesky/browser/BrowserActivity;->a(Landroid/webkit/HttpAuthHandler;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

    goto :goto_1

    :cond_1
    invoke-virtual {p2}, Landroid/webkit/HttpAuthHandler;->cancel()V

    goto :goto_1

    :cond_2
    move-object v0, v4

    move-object v1, v4

    goto :goto_0
.end method

.method public final onReceivedSslError(Landroid/webkit/WebView;Landroid/webkit/SslErrorHandler;Landroid/net/http/SslError;)V
    .locals 9

    const v8, 0x7f0c0071

    const v7, 0x7f030023

    const/4 v6, 0x0

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v3

    const v0, 0x7f030024

    invoke-virtual {v3, v0, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v4

    const v0, 0x7f0c005c

    invoke-virtual {v4, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    const/4 v1, 0x3

    invoke-virtual {p3, v1}, Landroid/net/http/SslError;->hasError(I)Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-virtual {v3, v7, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    invoke-virtual {v1, v8}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    const v5, 0x7f07008c

    invoke-virtual {v2, v5}, Landroid/widget/TextView;->setText(I)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_0
    const/4 v1, 0x2

    invoke-virtual {p3, v1}, Landroid/net/http/SslError;->hasError(I)Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-virtual {v3, v7, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    invoke-virtual {v1, v8}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    const v5, 0x7f07008d

    invoke-virtual {v2, v5}, Landroid/widget/TextView;->setText(I)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_1
    const/4 v1, 0x1

    invoke-virtual {p3, v1}, Landroid/net/http/SslError;->hasError(I)Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-virtual {v3, v7, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    invoke-virtual {v1, v8}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    const v5, 0x7f07008e

    invoke-virtual {v2, v5}, Landroid/widget/TextView;->setText(I)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_2
    const/4 v1, 0x0

    invoke-virtual {p3, v1}, Landroid/net/http/SslError;->hasError(I)Z

    move-result v1

    if-eqz v1, :cond_3

    invoke-virtual {v3, v7, v6}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/LinearLayout;

    invoke-virtual {v1, v8}, Landroid/widget/LinearLayout;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    const v3, 0x7f07008f

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(I)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    :cond_3
    new-instance v0, Landroid/app/AlertDialog$Builder;

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f07008a

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x1080027

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setIcon(I)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0, v4}, Landroid/app/AlertDialog$Builder;->setView(Landroid/view/View;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070089

    new-instance v2, Lcom/ninesky/browser/ci;

    invoke-direct {v2, p0, p2}, Lcom/ninesky/browser/ci;-><init>(Lcom/ninesky/browser/ao;Landroid/webkit/SslErrorHandler;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f07008b

    new-instance v2, Lcom/ninesky/browser/ch;

    invoke-direct {v2, p0, p1, p2, p3}, Lcom/ninesky/browser/ch;-><init>(Lcom/ninesky/browser/ao;Landroid/webkit/WebView;Landroid/webkit/SslErrorHandler;Landroid/net/http/SslError;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNeutralButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f070006

    new-instance v2, Lcom/ninesky/browser/cg;

    invoke-direct {v2, p0, p2}, Lcom/ninesky/browser/cg;-><init>(Lcom/ninesky/browser/ao;Landroid/webkit/SslErrorHandler;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    new-instance v1, Lcom/ninesky/browser/eh;

    invoke-direct {v1, p0, p2}, Lcom/ninesky/browser/eh;-><init>(Lcom/ninesky/browser/ao;Landroid/webkit/SslErrorHandler;)V

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    return-void
.end method

.method public final onUnhandledKeyEvent(Landroid/webkit/WebView;Landroid/view/KeyEvent;)V
    .locals 2

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {}, Lcom/ninesky/browser/TabControl;->a()Lcom/ninesky/browser/TabControl;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/TabControl;->b(Lcom/ninesky/browser/n;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    iget-boolean v0, v0, Lcom/ninesky/browser/BrowserActivity;->a:Z

    if-eqz v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p2}, Landroid/view/KeyEvent;->isDown()Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v1

    invoke-virtual {v0, v1, p2}, Lcom/ninesky/browser/BrowserActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v1

    invoke-virtual {v0, v1, p2}, Lcom/ninesky/browser/BrowserActivity;->onKeyUp(ILandroid/view/KeyEvent;)Z

    goto :goto_0
.end method

.method public final shouldOverrideKeyEvent(Landroid/webkit/WebView;Landroid/view/KeyEvent;)Z
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public final shouldOverrideUrlLoading(Landroid/webkit/WebView;Ljava/lang/String;)Z
    .locals 6

    const/4 v5, 0x1

    const/4 v4, 0x0

    const-string v0, "mailto:"

    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    invoke-static {p2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    :try_start_0
    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/BrowserActivity;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    move v0, v5

    :cond_0
    :goto_1
    return v0

    :catch_0
    move-exception v0

    const-string v1, "NSBrowser.Tab"

    const-string v2, "no activity for email"

    invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    iget-object v0, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v0}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v0

    const v1, 0x7f070077

    invoke-static {v0, v1, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    goto :goto_0

    :cond_1
    const-string v0, "wtai://wp/"

    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_6

    const-string v0, "wtai://wp/mc;"

    invoke-virtual {p2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_5

    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.VIEW"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "tel:"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v3, "wtai://wp/mc;"

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    invoke-virtual {p2, v3}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1}, Lcom/ninesky/browser/n;->a(Lcom/ninesky/browser/n;)Lcom/ninesky/browser/BrowserActivity;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/ninesky/browser/BrowserActivity;->startActivity(Landroid/content/Intent;)V

    move v0, v5

    :goto_2
    const-string v1, "wtai://wp/sd;"

    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    move v0, v4

    :cond_2
    const-string v1, "wtai://wp/ap;"

    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    move v0, v4

    :cond_3
    :goto_3
    const-string v1, "about:"

    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    move v0, v4

    :cond_4
    if-nez v0, :cond_0

    iget-object v1, p0, Lcom/ninesky/browser/ao;->a:Lcom/ninesky/browser/n;

    invoke-static {v1, p2}, Lcom/ninesky/browser/n;->c(Lcom/ninesky/browser/n;Ljava/lang/String;)V

    goto :goto_1

    :cond_5
    move v0, v4

    goto :goto_2

    :cond_6
    move v0, v4

    goto :goto_3
.end method
